<template>
  <section class="html2Canvas-box">
    <canvas :id="myId" ref="html2CanvasRef" />
  </section>
</template>

<script>
export default {
  name: 'Html2Canvas',
  props: {

  },
  data() {
    const myId = Math.random() * 10000 + new Date().getTime()
    return {
      myId
    }
  },
  mounted() {
    const myCanvas = document.getElementById(`${this.myId}`)
    if (myCanvas.getContext) {
      /* eslint-disable */
      const ctx = myCanvas.getContext('2d')
    } else {
      alert('the brower you use is not support canvas')
    }
  }
}
</script>

<style>

</style>
